//
//  TimeUtil.cpp
//  DemoV2
//
//  Created by 董一龙 on 2022/8/8.
//

#include "TimeUtil.hpp"
#include <sys/time.h>

namespace TimeUtil {

uint64_t getTimeStamp() {
    thread_local static timeval thread_tv;
    gettimeofday(&thread_tv, NULL);
    uint64_t cur_timestamp = thread_tv.tv_sec * 1000 + thread_tv.tv_usec / 1000;
    return cur_timestamp;
}

}
